/**
 * Mock response data for Polymarket RPC calls
 * Contains mock responses for blockchain interactions
 */

import {
  PROXY_WALLET_ADDRESS,
  USER_WALLET_ADDRESS,
  MOCK_USDC_BALANCE_WEI,
  POST_CLAIM_USDC_BALANCE_WEI,
  SAFE_FACTORY_ADDRESS,
  USDC_CONTRACT_ADDRESS,
  MULTICALL_CONTRACT_ADDRESS,
  CONDITIONAL_TOKENS_CONTRACT_ADDRESS,
} from './polymarket-constants';

export const MOCK_RPC_RESPONSES = {
  // Safe Factory call - return proxy wallet address (should be PROXY_WALLET_ADDRESS, not USER_WALLET_ADDRESS)
  SAFE_FACTORY_RESULT:
    '0x000000000000000000000000' + PROXY_WALLET_ADDRESS.slice(2).toLowerCase(),

  // USDC contract call - return mock balance
  USDC_BALANCE_RESULT: MOCK_USDC_BALANCE_WEI,

  // Post-claim USDC balance (48.16 USDC = 48,160,000 = 0x2de0300)
  POST_CLAIM_USDC_BALANCE_RESULT: POST_CLAIM_USDC_BALANCE_WEI,

  EMPTY_RESULT: '0x',

  // Mock approval result (true)
  APPROVAL_RESULT:
    '0x0000000000000000000000000000000000000000000000000000000000000001',

  BLOCK_NUMBER_RESULT: '0x1234567',

  ETH_BALANCE_RESULT: '0xde0b6b3a7640000',

  // Mock transaction count (nonce) - returns 0 as default nonce
  TRANSACTION_COUNT_RESULT: '0x0',

  // Mock contract code for deployed contracts
  CONTRACT_CODE_RESULT: '0x608060405234801561001057600080fd5b50',

  // Mock transaction receipt for confirmed transactions
  // This receipt indicates a successful transaction confirmation
  TRANSACTION_RECEIPT_RESULT: {
    transactionHash:
      '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
    transactionIndex: '0x0',
    blockNumber: '0x1234568',
    blockHash:
      '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890',
    from: USER_WALLET_ADDRESS.toLowerCase(),
    to: PROXY_WALLET_ADDRESS.toLowerCase(),
    cumulativeGasUsed: '0x94670',
    gasUsed: '0x94670',
    contractAddress: null,
    logs: [],
    status: '0x1', // Success status
    logsBloom:
      '0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000',
  },
};

// Re-export for backward compatibility
export {
  USER_WALLET_ADDRESS,
  MOCK_USDC_BALANCE_WEI,
  POST_CLAIM_USDC_BALANCE_WEI,
  SAFE_FACTORY_ADDRESS,
  USDC_CONTRACT_ADDRESS,
  MULTICALL_CONTRACT_ADDRESS,
  CONDITIONAL_TOKENS_CONTRACT_ADDRESS,
};
